<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>订单详情</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/static/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/static/admin/style/admin.css" media="all">

</head>
<body>
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body">
            <div class="layui-row">
                <div class="layui-col-md5">
                    <table class="layui-table" lay-size="lg">
                        <thead>
                        <tr>
                            <th colspan="2" style="text-align: center;font-weight: bold;font-size: 16px;">体检人详情信息</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td width="20%"><i class="layui-icon">&#x1005;</i> 订单状态</td>
                            <td><span class="layui-btn layui-btn-sm">{$notes.state[$detail.state]}</span></td>
                        </tr>
                        <tr>
                            <td><i class="layui-icon">&#xe66f;</i> 体检人姓名</td>
                            <td>{$detail.name}</td>
                        </tr>
                        <tr>
                            <td><i class="layui-icon">&#xe678;</i> 体检人联系方式</td>
                            <td>{$detail.phone}</td>
                        </tr>
                        <tr>
                            <td><i class="layui-icon">&#x1005;</i> 体检人身份证号</td>
                            <td>{$detail.idcard}</td>
                        </tr>
                        <tr>
                            <td><i class="layui-icon">&#xe609;</i> 性别</td>
                            <td>{notempty name="$detail.sex"}{$detail.sex}{/notempty}</td>
                        </tr>
                        <tr>
                            <td><i class="layui-icon">&#xe636;</i> 是否患有糖尿病</td>
                            <td>{notempty name="$detail.diabetes"}{$detail.diabetes}{/notempty}</td>
                        </tr>
                        <tr>
                            <td><i class="layui-icon">&#xe63c;</i> 体检医院</td>
                            <td>{$detail.hospital}</td>
                        </tr>
                        <tr>
                            <td><i class="layui-icon">&#xe637;</i> 体检时间</td>
                            <td>{$detail.check_time|date='Y-m-d'}</td>
                        </tr>
                        <tr>
                            <td><i class="layui-icon">&#xe60e;</i> 信息提交时间</td>
                            <td>{$detail.add_time|date='Y-m-d H:i:s'}</td>
                        </tr>
                        <tr>
                            <td><i class="layui-icon">&#xe7ae;</i> 信息来源网站</td>
                            <td>{$detail.weburl}</td>
                        </tr>
                        <tr>
                            <td><i class="layui-icon">&#xe63a;</i> 预约渠道</td>
                            <td>{$notes.form[$detail.from]}</td>
                        </tr>
                        <tr>
                            <td><i class="layui-icon">&#xe715;</i> IP地址</td>
                            <td>{notempty name="$detail.ip"}{$detail.ip}{/notempty}</td>
                        </tr>
                        <tr>
                            <td><i class="layui-icon">&#xe715;</i> 省份</td>
                            <td>{notempty name="$detail.city"}{$detail.city}{/notempty}</td>
                        </tr>
                        <tr>
                            <td><i class="layui-icon">&#xe60b;</i> 病情描述</td>
                            <td>{notempty name="$detail.message"}{$detail.message}{/notempty}</td>
                        </tr>
                        <tr>
                            <td><i class="layui-icon">&#xe60b;</i> 备注说明</td>
                            <td>{notempty name="$detail.info"}{$detail.info}{/notempty}</td>
                        </tr>
                        </tbody>
                    </table>

                    <table class="layui-table" lay-size="lg">
                        <thead>
                        <tr>
                            <th style="text-align: center;font-weight: bold;font-size: 16px;">复制体检人信息</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>
                                <textarea id="textCopy" rows="10" class="layui-textarea">
体检人姓名：{$detail.name}&#13;
联系方式：{$detail.phone}&#13;
体检人身份证号：{$detail.idcard}&#13;
{notempty name="$detail.sex"}性别：{$detail.sex}&#13;{/notempty}
{notempty name="$detail.diabetes"}是否患有糖尿病：{$detail.diabetes}&#13;{/notempty}
体检时间：{$detail.check_time|date='Y-m-d'}&#13;
体检医院：{$detail.hospital}&#13;
病情描述：{$detail.message}
                                </textarea>
                                <button type="button" class="layui-btn layui-btn-fluid" onclick="copy()">点击复制</button>
                            </td>
                        </tr>

                        </tbody>
                    </table>
                </div>
                <div class="layui-col-md6 layui-col-md-offset1">
                    <div class="layui-tab">
                        <ul class="layui-tab-title">
                            <li class="layui-this layui-font-16"><i class="layui-icon">&#xe61f;</i> 订单状态</li>
                            <li><i class="layui-icon">&#xe600;</i> 收入与支出</li>
                            <li><i class="layui-icon">&#xe62a;</i> 二次开发跟踪</li>
                        </ul>
                        <div class="layui-tab-content">
                            <div class="layui-tab-item layui-show">
                                <ul class="layui-timeline">
                                    {volist name="stateList" id="vo" key="k" empty="<li class='layui-timeline-item'>暂无数据</li>"}
                                    <li class="layui-timeline-item">
                                        <i class="layui-icon layui-timeline-axis">&#xe63f;</i>
                                        <div class="layui-timeline-content layui-text">
                                            <h3 class="layui-timeline-title">{$vo.add_time|date='Y年m月d日'}</h3>
                                            <p>
                                                状态：<span class="layui-badge layui-bg-green">{$notes.state[$vo.state]}</span>
                                                <br>
                                                {$vo.desc}
                                            </p>
                                        </div>
                                    </li>
                                    {/volist}

                                    <li class="layui-timeline-item">
                                        <i class="layui-icon layui-timeline-axis">&#xe63f;</i>
                                        <div class="layui-timeline-content layui-text">
                                            <div class="layui-timeline-title">
                                                <button type="button" class="layui-btn layui-btn-warm layui-btn-radius layui-btn-sm" id="addState">更新状态</button>
                                            </div>
                                        </div>
                                    </li>
                                </ul>
                            </div>
                            <div class="layui-tab-item">
                                <blockquote class="layui-elem-quote">总收入：<span class="layui-badge">{$totalProfit}</span>元 &nbsp;&nbsp;总支出：<span class="layui-badge layui-bg-black">{$totalPay}</span>元</blockquote>
                                <ul class="layui-timeline">
                                    {volist name="moneyList" id="vo" key="k" empty="<li class='layui-timeline-item'>暂无数据</li>"}
                                    <li class="layui-timeline-item">
                                        <i class="layui-icon layui-timeline-axis">&#xe63f;</i>
                                        <div class="layui-timeline-content layui-text">
                                            <h3 class="layui-timeline-title">{$vo.add_time|date='Y年m月d日'}</h3>
                                            <p>
                                                {notempty name="$vo.profit"}收入：<span class="layui-badge">{$vo.profit}</span>元<br>{/notempty}
                                                {notempty name="$vo.pay"}支出：<span class="layui-badge layui-bg-black">{$vo.pay}</span>元<br>{/notempty}
                                                {notempty name="$vo.desc"}描述：{$vo.desc}<br>{/notempty}
                                            </p>
                                        </div>
                                    </li>
                                    {/volist}
                                    <li class="layui-timeline-item">
                                        <i class="layui-icon layui-timeline-axis">&#xe63f;</i>
                                        <div class="layui-timeline-content layui-text">
                                            <div class="layui-timeline-title">
                                                <button type="button" class="layui-btn layui-btn-warm layui-btn-radius layui-btn-sm" id="addMoney">更新</button>
                                            </div>
                                        </div>
                                    </li>
                                </ul>
                            </div>
                            <div class="layui-tab-item">
                                <ul class="layui-timeline">
                                    {volist name="trackList" id="vo" key="k" empty="<li class='layui-timeline-item'>暂无数据</li>"}
                                    <li class="layui-timeline-item">
                                        <i class="layui-icon layui-timeline-axis">&#xe63f;</i>
                                        <div class="layui-timeline-content layui-text">
                                            <h3 class="layui-timeline-title">{$vo.add_time|date='Y年m月d日'}</h3>
                                            <p>
                                                提醒时间：<span class="layui-badge">{$vo.tips_time|date='Y-m-d'}</span><br>
                                                描述：{$vo.desc}<br>
                                            </p>
                                        </div>
                                    </li>
                                    {/volist}

                                    <li class="layui-timeline-item">
                                        <i class="layui-icon layui-timeline-axis">&#xe63f;</i>
                                        <div class="layui-timeline-content layui-text">
                                            <div class="layui-timeline-title">
                                                <button type="button" class="layui-btn layui-btn-warm layui-btn-radius layui-btn-sm" id="addTrack">更新</button>
                                            </div>
                                        </div>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>


        </div>
    </div>
</div>

<script src="/static/layui/layui.js"></script>
<script src="/static/common/js/layTool.js"></script>
<script src="/static/common/js/jquery.min.js"></script>

<script>


    $("#addState").click(function(){
        layTool.open("/admin/order/addState/order_id/" + {$orderId} + "/old_state/" + {$oldState}, "更新订单状态", '40%', '35%');
    });
    $("#addMoney").click(function(){
        layTool.open("/admin/order/addMoney/order_id/" + {$orderId} + "/old_state/" + {$oldState}, "更新订单收入与支出", '40%', '50%');
    });
    $("#addTrack").click(function(){
        layTool.open("/admin/order/addTrack/order_id/" + {$orderId} + "/old_state/" + {$oldState}, "更新二次开发跟踪", '40%', '45%');
    });

    function copy() {
        var txt = document.getElementById("textCopy");
        txt.select(); // 选择对象
        document.execCommand("Copy"); // 执行浏览器复制命令
        alert("已复制好，可贴粘。");
    }


    layui.config({
        base: '/static/admin/'
    }).use(['table','element'], function(){
        var $ = layui.$
            ,form = layui.form
            ,table = layui.table,
            element = layui.element;
    });

</script>
</body>
</html>
